1. Field of the Invention
The present invention relates to a technique for generating sampling clocks which are synchronized with video signals input from a computer or the like.
2. Description of Related Art
Video signals which are output from an engineering work station, a personal computer or a display terminal of a computer are output as an analog signal based on dots which correspond to picture elements on a display screen.
In the prior art, the video signals are converted to a digital signal, and then the digital signal is subjected to various kinds of image processing such as conversion processing of a signal format such as a field frequency, an aspect ratio, etc., enlargement and reduction processing, frame composite processing, geometric conversion processing, etc. by using a memory, an operation processing circuit, etc.
In order to perform such digital signal processing as described above, AID conversion processing is used for converting analog video signals to digital data.
The analog video signals are sampled and converted to digital data by an A/D converting circuit at a timing which is determined on the basis of the sampling clocks. Therefore, the phase of the sampling clocks must be perfectly synchronized with the phase of the dots on the video signals (hereinafter referred to as xe2x80x9cdot phasexe2x80x9d) when the analog video signals are sampled and converted to the digital signal by the A/D converting circuit.
If the phase of the sampling clocks is not accurately coincident with the dot phase, picture elements frequently occur that have obscure intermediate gradation at an edge portion corresponding to a shift from white to black or from black to white, resulting in degradation in image quality. The degradation in image quality is particularly apparent when characters or fine patterns are displayed.
In general, the frequency of the dots on the video signals (hereinafter referred to as xe2x80x9cdot frequencyxe2x80x9d) is set to an integer multiple of the horizontal scanning frequency of a display. Therefore, in the prior art, those signals which are synchronized in phase with horizontal synchronizing signals and have the frequency of the integer multiple of the horizontal scanning frequency are generated by a PLL (Phase Locked Loop) circuit, thereby generating sampling clocks which are synchronized with the phase of the dot phase of the dot frequency.
As described above, the sampling clocks are controlled to be synchronized with the horizontal synchronizing signals by the PLL. However, inactuality, the phase of the sampling clocks generated on the basis of the synchronizing signals is not always synchronized in phase with the dot phase due to the processing delay of a synchronizing separating circuit for separating the horizontal synchronizing signals from the video signals (when the synchronizing signals are transmitted while superposed on the video signals), the difference in processing delay between the horizontal synchronizing signals and the video signals which are normally processed in a different system, or the variance between the length of a transmission cable for transmitting the horizontal synchronizing signals and the length of a transmission cable for transmitting the video signals (when the synchronizing signals are transmitted independently from the video signals). Therefore, in this case, the phase of the sampling clocks or the synchronizing signals is required to be delayed through a delay line, thereby adjusting the sampling clock phase.
Recently, display video signals in an engineering work station, a personal computer, etc. have been improved in resolution and fineness, and this improvement promotes increasing of the dot frequency up to about 150 MHz. Such an improvement in resolution and fineness for the video signals is expected to be further promoted. Further, the adjustment of the sampling clock phase as described above must be performed with sufficient precision which corresponds to about at least one-tenth of the dot period time. For example, for the dot frequency of 110 MHz, the adjustment must be performed with 1-ns level precision.
Such a phase adjustment is needed every time a device for outputting the video signals and the synchronizing signals to be sampled is replaced by another, or when the horizontal scanning frequency or the dot frequency of the input video signals is varied.
Therefore, in the conventional device, an operator must adjust the sampling clock phase while seeing a display image or the like on a screen every time the input video signals are changed.
Furthermore, as a sampling-phase adjusting manner, it may be considered to beforehand check the adjustment amount of the sampling clock phase for all the video signals which are possibly input, and vary a set value in accordance with the change of the input video signals. However, even in this case, the operator must perform the phase adjustment as described above for all the video signals while seeing a display image on the screen when adjustment for installation is performed or new signals are reviewed.
That is, the conventional technique for the adjustment of the sampling clock phase has various problems in that the adjustment of the sampling clock phase is cumbersome, it is inconvenient to users and the adjustment for installation requires a long time.
Therefore, an object of the present invention is to provide a video signal processing device which can adjust the sampling clock phase more easily and with higher precision.
In order to attain the above object according to the present invention the video signal processing device in which video signals representing an image are converted to multi-valued digital data representing picture elements each contained in the image at a timing based on sampling clocks, includes conversion means for successively sampling the video signals at the timing based on the sampling clocks to convert the video signals to the multi-valued digital data, classification means for successively classifying the converted multi-valued digital data into a low-level picture-element data group having values contained in a first value range and a high-level picture-element data group having values contained in a second value range which are higher than the values of the first value range, calculation means for successively calculating statistics which are based on the variance of the values of low-level picture element data in the classified low-level picture-element data group and the variance of the values of high-level picture element data in the classified high-level picture-element data group, and adjustment means for adjusting the phase of the sampling clocks on the basis of the successively calculated statistics so that the variance of the values of the low-level picture element data and the variance of the values of the high-level picture element data are reduced.
According to the video signal processing device of the present invention, the phase of the sampling clocks can be properly adjusted by merely supplying the video processing device with, as video signals, an image comprising picture elements which are converted to digital data having a first specific value contained in the first value range, and picture elements which are converted to digital data having a second specific value contained in the second value range.
That is, in the video signal processing device, the multi-valued digital data converted in the conversion means are classified into the low-level picture element data group having the values contained in the first value range and the high-level picture element data group having the values contained in the second value range which are higher than the values of the first value range in the classification means, and the statistic which is based on the variance of the values of the low-level picture element data in the classified low-level picture element data group and the variance of the values of the high-level picture element data in the classified high-level picture element data group is successively calculated in the calculation means. If the sum of the variance of the values of the low-level picture element data in the low-level picture element data group and the variance of the values of the high-level picture element data in the high-level picture element data group are used as the statistics, the two variance values and the sum of the variance values are minimized when the sampling clock phase is properly adjusted because no obscure intermediate gradation occurs.
Accordingly, the sampling clock phase can be properly adjusted by adjusting the phase of the sampling clocks on the basis of the statistics so that the variance of the values of the low-level picture element data and the variance of the values of the high-level picture element data are reduced.